<div id="shi" class="">
    锄禾日当午，<br />
    汗滴禾下土。<br />
    谁知盘中餐，<br />
    粒粒皆辛苦。<br />
</div>
<form method="post" action="">
    <select name="color">
        <option value="">---请输入颜色---</option>
        <option value="1">红色</option>
        <option value="2">绿色</option>
        <option value="3">黑色</option>
        <input type="submit" name="button" value="提交">
    </select>
</form>
<?php
header("content-type:text/html;charset=utf-8");
    if(isset($_POST['button'])):
    $color=$_POST['color'];
    switch($color):
        case"1":
        $color="#ff0000";
        break;
        case"2":
       $color="#ff0000";
       break;
      case"3":
      $color="#ff0000";
       break;
endswitch;
?>
<script type="text/javascript">
    window.onload=function(){
    shi.style.color="<?php echo $color ?>";
    }
</script>
<?php
    endif;
?>